cmake_minimum_required(VERSION 3.18 FATAL_ERROR)
project(libtorch_test)

set(CMAKE_PREFIX_PATH "$ENV{HOME}/bin/libtorch")

find_package(Torch REQUIRED)
message("TORCH_LIBRARIES=${TORCH_LIBRARIES}")
message("CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TORCH_CXX_FLAGS}")

add_executable(activation activations_aten.cpp activations_cpu.cpp main.cpp)
target_link_libraries(activation "${TORCH_LIBRARIES}")
set_property(TARGET activation PROPERTY CXX_STANDARD 17)
